package entity;

import java.util.ArrayList;
import java.util.List;

// 用来存放每个学生的信息的数组(顺序表)
public class StudentList {
    // 使用单例模式来创建
    private volatile static List<Student> instance = null;

    public static List<Student> getInstance() {
        if (instance == null) {
            synchronized (StudentList.class) {
                if (instance == null) {
                    instance = new ArrayList<>();
                }
            }
        }
        return instance;
    }

    private StudentList() {

    }
}
